from config import win_size
from libs.ZNode import ZNode
from libs.components.ZTiled import ZTiled


class ZMap ( ZNode ) :
    def __init__ ( self , father , filename ) :
        super ( ZMap , self ).__init__ ( father , [ [ 0 , 0 ] , win_size ] )
        self.map_data = ZTiled ( self , filename )

    def draw ( self ) :
        self.map_data.draw ( )
        self.map_data.move ( )


    def update ( self , event , keys , m_keys , m_pos ) :
        self.map_data.update ( event , keys , m_keys , m_pos )
